#include "memorypool.h"
#include <boost/pool/pool.hpp>

boost::pool<> _mp(sizeof(char));

MemoryPool::MemoryPool()
{

}

MemoryPool::~MemoryPool()
{

}

void *MemoryPool::alloc(size_t n)
{
    return _mp.ordered_malloc(n);
}

void MemoryPool::free(void *p, size_t n)
{
    _mp.ordered_free(p, n);
}

bool MemoryPool::isFromThis(void *p)
{
    return _mp.is_from(p);
}
